package com.ctbri.manage.quality;
import com.ctbri.manage.quality.config.YamlReader;

import java.io.FileNotFoundException;
import java.util.Map;
import com.ctbri.manage.bydeequ.calculate.DeequCalculate;

public class DeequMain {
    public static void main(String[] args) throws FileNotFoundException {
        //导入主配置文件信息
        final String filePathOfMainConfig = args[0];
        Map<String, Object> confMain = YamlReader.getInstance(filePathOfMainConfig).getConf();
        System.out.println("file path of main config:");
        System.out.println(confMain);
        final String basicConfigPath = YamlReader.getInstance(filePathOfMainConfig).getString("basicConfigPath");
        final String dataSource = YamlReader.getInstance(filePathOfMainConfig).getString("dataSource");
        System.out.println("basicConfigPath: " + basicConfigPath);
        System.out.println("dataSource: " + dataSource);
        DeequCalculate deequCalculate = new DeequCalculate(basicConfigPath, dataSource);
        deequCalculate.calc();
    }
}
